package com.zut.service.impl;
import com.zut.dao.EnvDataDao;
import com.zut.domain.EnvData;
import com.zut.service.EnvDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EnvDataServiceImpl implements EnvDataService{

    @Autowired
    private EnvDataDao envDataDao;

    @Override
    public boolean insert(EnvData envData) {
        return envDataDao.insert(envData) > 0;
    }

    @Override
    public List<EnvData> selectByTimestampIntervalAndToken(String startTimestamp, String endTimestamp, String token) {
        System.out.println(envDataDao.selectByTimestampIntervalAndToken(startTimestamp,endTimestamp,token));
        return envDataDao.selectByTimestampIntervalAndToken(startTimestamp,endTimestamp,token);
    }
}
